/**
 * Copyright (c) 2017,安徽皖通科技股份有限公司 All rights reserved.
 * @data:2017年10月10日
 * @author:MaShibo
 */
package com.wttech.dzzf.process.model.user;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import com.wtkj.dao.annotation.DatabaseTable;
import com.wtkj.dao.annotation.PrimaryKey;
import com.wtkj.vo.AbstractValueObject;

import cn.com.taiji.sdk.model.comm.protocol.annotation.EnumValidate;
import etc.com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 车辆信息
 * 
 * @date 2017年10月10日
 * @author MaShibo
 */
@SuppressWarnings("serial")
@Data
@EqualsAndHashCode(callSuper = false)
@DatabaseTable(tableName = "BS_VEHICLE")
public class Vehicle extends AbstractValueObject {
    
    
    @PrimaryKey
    @Pattern(message = "id格式不正确", regexp = "^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}_[0-9]$")
    @Size(max = 17, message = "id最大长度为15字符")
    @NotNull(message = "id必填")
    private String id;
    
    @NotNull(message = "type必填")
    @EnumValidate(message = "type不正确", regexp = "(1|2|3|4|11|12|13|14|15)")
    private Integer type;
    
    @Size(max = 32, message = "userId最大长度为32字符")
    @NotNull(message = "userId必填")
    private String userId;
    
    @Size(max = 150, message = "ownerName最大长度为150字符")
    private String ownerName;
    
    @EnumValidate(message = "ownerIdType不正确", regexp = "(101|102|103|104|105|106|201|202|203|204|205|206|199|299)")
    private Integer ownerIdType;
    
    @Size(max = 30, message = "ownerIdNum最大长度为30字符")
    private String ownerIdNum;
    
    @Size(max = 20, message = "ownerTel最大长度为20字符")
    private String ownerTel;
    
    @Size(max = 300, message = "address最大长度为300字符")
    private String address;
    
    @Size(max = 150, message = "contact最大长度为150字符")
    @NotNull(message = "contact必填")
    private String contact;
    
    @EnumValidate(message = "registeredType不正确", regexp = "(1|2)")
    @NotNull(message = "registeredType必填")
    private Integer registeredType;
    
    @Size(max = 20, message = "channelId最大长度为20字符")
    @NotNull(message = "channelId必填")
    private String channelId;
    
    @Size(max = 20, message = "registeredTime最大长度为20字符")
    @NotNull(message = "registeredTime必填")
    private String registeredTime;
    
    @Size(max = 50, message = "fileNum最大长度为50字符")
    private String fileNum;
    
    @Size(max = 50, message = "vehicleType最大长度为50字符")
    private String vehicleType;
    
    @Size(max = 50, message = "vehicleModel最大长度为50字符")
    private String vehicleModel;
    
    @EnumValidate(message = "车辆使用性质格式错误", regexp = "(1|2|3|4|5|6|7)")
    private Integer useCharacter;
    
    @Size(max = 50, message = "VIN最大长度为50字符")
    @JsonProperty("VIN")
    @NotNull(message = "vin 必填")
    private String vin;
    
    @Size(max = 50, message = "engineNum最大长度为50字符")
    private String engineNum;
    
    @Size(max = 20, message = "registerDate最大长度为20字符")
    private String registerDate;
    
    @Size(max = 20, message = "issueDate最大长度为20字符")
    private String issueDate;
    
    private Integer approvedCount;
    
    private Integer totalMass;
    
    private Integer maintenanceMass;
    
    private Integer permittedWeight;
    
    @Size(max = 100, message = "outsideDimensions最大长度为100字符")
    private String outsideDimensions;
    
    private Integer permittedTowWeight;
    
    @Size(max = 50, message = "testRecord最大长度为50字符")
    private String testRecord;
    
    private Integer wheelCount;
    
    private Integer axleCount;
    
    private Integer axleDistance;
    
    @Size(max = 50, message = "axisType最大长度为50字符")
    private String axisType;
    
    @EnumValidate(message = "operation不正确", regexp = "(1|2|3)")
    @NotNull(message = "operation 必填")
    private Integer operation = 1;
}
